/**
 * Array.h
 * list interface and structure.
 * @author: zt 2013-10-08
 */
#ifndef __ARRAY_H__
#define __ARRAY_H__

#define ARRAYERROR_CapacityBeyondRange 2

#define TRUE 1
#define FALSE 0


typedef struct Array_tag {
	void* attr;
	
	int (*Init)(struct Array_tag* array, int initCapacity);
	void (*Destroy)(struct Array_tag* array);
	
	int (*Size)(struct Array_tag* array);
	int (*Capacity)(struct Array_tag* array);
	
	void (*Push)(struct Array_tag* array,int item);
	int (*Pop)(struct Array_tag* array);
	void (*Set)(struct Array_tag* array, int index, int item);
	int (*Get)(struct Array_tag* array, int index);

	
} Array;

Array* ArrayConstructor(Array* array);

#endif
